const {nodeResolve} = require("@rollup/plugin-node-resolve");
const PluginVue = require("rollup-plugin-vue");
const commonjs = require("@rollup/plugin-commonjs");
const replace = require("@rollup/plugin-replace");

export default {
  input: './src/js/journal.js',
  external: ['vue'],
  plugins: [
    nodeResolve(),
    PluginVue({
      preprocessStyles: true,
    }),
    commonjs(),
    replace({
      'process.env.NODE_ENV': JSON.stringify('development'),
      preventAssignment:true,
    }),
  ],
  output:{
    name: 'journal',
    file: 'test/journal.iife.js',
    format: 'iife',
    globals: {
      vue: 'Vue',
    },
  }
};
